﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace otis.entities.products
{
    /// <summary>
    /// 样式
    /// </summary>
    public class StyleDetails
    {
        public int Id { get; set; }

        public string Name { get; set; }

        public string ImageUrl { get; set; }

        public Campaign Campaign { get; set; }

        public StyleAttachBigType StyleAttachBigType { get; set; }
    }


    public class StyleDetailsHelper{
        public static List<StyleDetails> InitStyleDetails(List<Campaign> campaigns, List<StyleAttachBigType> styleAttachBigTypes)
        {
            var items = new List<StyleDetails>();
            StyleAttachBigType styleAttachBigType = (from p in styleAttachBigTypes where p.Name.Equals("轿壁式样") select p).First();
            Campaign campaign = (from p in campaigns where p.Name.Equals("GeN2") select p).First();
            items.Add(new StyleDetails() { Id=1, Name="2120", ImageUrl="/Assets/product/style/01.jpg", StyleAttachBigType = styleAttachBigType,Campaign = campaign });
            items.Add(new StyleDetails() { Id = 2, Name = "2123", ImageUrl = "/Assets/product/style/02.jpg", StyleAttachBigType = styleAttachBigType, Campaign = campaign });
            items.Add(new StyleDetails() { Id = 3, Name = "2139", ImageUrl = "/Assets/product/style/03.jpg", StyleAttachBigType = styleAttachBigType, Campaign = campaign });
            items.Add(new StyleDetails() { Id = 4, Name = "2140", ImageUrl = "/Assets/product/style/01.jpg", StyleAttachBigType = styleAttachBigType, Campaign = campaign });
            return items;
        }
    }
}
